package com.sreasons.prjhotel.model;

import java.io.Serializable;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name="cliente")
public class Cliente implements Serializable {

	
	/**
	 * 
	 */
	private static final long serialVersionUID = -606664204720341896L;

	@Id
	@Column
	private int idclie;
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="idempr")
	private Empresa empresa;
	
	@Column
	private String nombre;
	
	@Column
	private String apepat;
	
	@Column
	private String apemat;
	
	@Column
	private String dni;
	
	@OneToMany(mappedBy="cliente")
	private List<Reserva> reservas;

	public int getIdclie() {
		return idclie;
	}

	public void setIdclie(int idclie) {
		this.idclie = idclie;
	}

	public Empresa getEmpresa() {
		return empresa;
	}

	public void setEmpresa(Empresa empresa) {
		this.empresa = empresa;
	}

	public String getNombre() {
		return nombre;
	}

	public void setNombre(String nombre) {
		this.nombre = nombre;
	}

	public String getApepat() {
		return apepat;
	}

	public void setApepat(String apepat) {
		this.apepat = apepat;
	}

	public String getApemat() {
		return apemat;
	}

	public void setApemat(String apemat) {
		this.apemat = apemat;
	}

	public String getDni() {
		return dni;
	}

	public void setDni(String dni) {
		this.dni = dni;
	}

	public List<Reserva> getReservas() {
		return reservas;
	}

	public void setReservas(List<Reserva> reservas) {
		this.reservas = reservas;
	}
	
}
